package com.lmaos.basetools.files.scan.factory;

import java.util.List;

import com.lmaos.basetools.files.scan.ScanFile;
import com.lmaos.basetools.files.scan.ScanFileExecute;
import com.lmaos.basetools.files.scan.impl.BasicScanFileExecute;
import com.lmaos.basetools.files.scan.parse.JarSuffixScanFileParse;

public class DirAndJarScanFileFactory {
	
	private static ScanFileExecute dirAndJarscanFileExecute = new BasicScanFileExecute();
	private static ScanFileExecute dirScanFileExecute = new BasicScanFileExecute();
	static{
		dirAndJarscanFileExecute.addSuffixScanFileParse("jar", new JarSuffixScanFileParse());
	}
	public static ScanFileExecute getScanFileExecute() {
		return dirAndJarscanFileExecute;
	}
	public static List<ScanFile> scan(String scanRootPath){
		return getScanFileExecute().execScan(scanRootPath);
	}
	
	public static List<ScanFile> scanOnlyDir(String scanRootPath){
		return dirScanFileExecute.execScan(scanRootPath);
	}
}
